package org.cl.user.service;

import java.util.List;
import java.util.Map;

import org.cl.user.mybatis.client.UserMapper;
import org.cl.user.mybatis.domain.User;
import org.cl.user.mybatis.domain.UserExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService {
	
@Autowired
private UserMapper userMapper;

@Transactional
public List<User> Login(User user){
	
	UserExample ue = new UserExample();
	ue.createCriteria().andUsernameEqualTo(user.getUsername()).andPasswordEqualTo(user.getPassword());
	
	return  userMapper.selectByExample(ue);
	
}
	
}
